package com.ruoyi.wvp.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import io.swagger.v3.oas.annotations.media.Schema;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseModel;

import io.swagger.v3.oas.annotations.media.Schema;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 行政单位对象 wvp_address_unit
 * 
 * @author ruoyi
 * @date 2024-07-22
 */
@Schema(description = "行政单位对象")
@TableName("wvp_address_unit")
@Setter
@Getter
@ToString
public class AddressUnit extends BaseModel implements Comparable<AddressUnit>{
    private static final long serialVersionUID = 1L;

    @Excel(name = "上级单位名称")
    @TableField(exist = false)
    private String parentName;

    /** id */
    @Schema(title = "id")
    @TableId(type = IdType.AUTO)
    private Long id;
    /** 父部门id */
    @Schema(title = "父部门id")

    private Long parentId;
    /** 祖级列表 */
    @Schema(title = "祖级列表")
    private String ancestors;
    /** 名称 */
    @Schema(title = "名称")
    @Excel(name = "名称")
    private String name;
    /** 显示顺序 */
    @Schema(title = "显示顺序")

    private Integer orderNum;
    /** 状态（0正常 1停用） */
    @Schema(title = "状态（0正常 1停用）")
    private String status;

    @Schema(title = "级别0 省1市 2 区  3 街道 4 社区 5 小区")
    private Integer level;

    @Override
    public int compareTo(AddressUnit o) {

        return this.name.compareTo(o.name);
    }
}
